﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.StyleCop.CSharp;

namespace SPStyleCop.Rules.SPQueryRuleItems
{
    internal sealed class ViewFieldRuleItem : RuleAnalyzerBase
    {
        internal ViewFieldRuleItem()
        {

        }

        public override void VisitElement(Microsoft.StyleCop.CSharp.CsElement element, Microsoft.StyleCop.CSharp.CsElement parentElement, object context)
        {

            this.SourceAnalyzer.AddViolation(element, "ViewFieldsMustBeDefined", new object[] { "ab", "b" });
            
        }

        public override void VisitAfterAnalysis(Microsoft.StyleCop.CodeDocument document)
        {
            
            CsDocument cd = (CsDocument) document;
            this.SourceAnalyzer.AddViolation(cd.RootElement, "ViewFieldsMustBeDefined", new object[] { "ab", "b" });
        }
         
    }
}
